package com.lc.hot100.lc206;

import com.lc.utils.ListNode;

public class Main {

}

class Solution {
    public ListNode reverseList(ListNode head) {
        
    	ListNode pre = null;
    	ListNode h = head;
    	
    	while(h != null) {
        	ListNode t = h.next;
        	h.next = pre;
        	pre = h;
        	h = t;
    	}
    	return pre;

    }
}
